<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'product-form',
	'enableAjaxValidation'=>true,
	'htmlOptions' => array('enctype' => 'multipart/form-data'), 
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
	
	<div class="column1" style="width:53%; margin-left:0px;">
		<div class="row">
			<?php echo $form->labelEx($model,'pro_name'); ?>
			<?php echo $form->textField($model,'pro_name',array('size'=>60,'maxlength'=>200)); ?>
			<?php echo $form->error($model,'pro_name'); ?>
		</div>
		<div class="row">
			<?php echo $form->labelEx($model,'pro_price'); ?>
			<?php echo $form->textField($model,'pro_price',array('size'=>2,'maxlength'=>2)); ?>
			<?php echo $form->error($model,'pro_price'); ?>
		</div>		
	</div>
	<div class="column2" style="margin-left:55%;">
		<div class="row">
			<?php echo $form->labelEx($model,'pro_pic_id'); ?>
			<?php echo $form->hiddenField($model,'pro_pic_id'); ?>
			<?php echo $form->error($model,'pro_pic_id'); ?>
		</div>	
	</div>
	<div class="clear"></div>
	
	<div class="row column1 left">
		<?php echo $form->labelEx($model,'pro_cid'); ?>
		<?php echo $form->dropDownList($model,'pro_cid',Category::model()->getCategoryDropdownList(Category::CATEGORY_PRODUCT)); ?>
		<?php echo $form->error($model,'pro_cid'); ?>
	</div>
	
	<div class="row column2 left">
		<?php echo $form->labelEx($model,'pro_recommend'); ?>
		<?php echo $form->dropDownList($model,'pro_recommend',Product::model()->generateCommentStateDropdownList()); ?>
		<?php echo $form->error($model,'pro_recommend'); ?>
	</div>
	<div class="clear"></div>

	<div class="row column3 first">
		<?php echo $form->labelEx($model,'pro_left'); ?>
		<?php echo $form->textField($model,'pro_left'); ?>
		<?php echo $form->error($model,'pro_left'); ?>
	</div>

	<div class="row column3">
		<?php echo $form->labelEx($model,'pro_sold'); ?>
		<?php echo $form->textField($model,'pro_sold'); ?>
		<?php echo $form->error($model,'pro_sold'); ?>
	</div>

	<div class="row column3">
		<?php echo $form->labelEx($model,'pro_discount'); ?>
		<?php echo $form->textField($model,'pro_discount'); ?>
		<?php echo $form->error($model,'pro_discount'); ?>
	</div>
	<div class="clear"></div>

	<div class="row">
		<?php echo $form->labelEx($model,'pro_describe'); ?>
		<?php echo $form->textArea($model,'pro_describe',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'pro_describe'); ?>
	</div>

	<div class="row buttons">
		<?php $this->widget('zii.widgets.jui.CJuiButton',
				array(
					'name'=>'button',
					'buttonType'=>'submit',
					'htmlOptions'=>array(
						'id'=>'product_submit'
					),
					'caption'=>$model->isNewRecord ? 'Create' : 'Save',
					///'onclick'=>'js:function(){alert("Save button clicked"); this.blur(); return false;}',
				)
			);
		?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->